<div class="tableToolbar">
	<div class="coll-md-8" id="addInput">
		<div class="coll-md-2">
			<input type="text" class='search' placeholder="请输入角色名称" ng-model="ctrlScope.itemsearch.roleName">
		</div>
		<div class="coll-md-2">
			<input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
			<input type="button" class="small-icon search2" value="搜索">
			<input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
			<input type="button" class="small-icon reset" value="重置">
		</div>
	</div>
	<div class="coll-md-2">
        <input type="button" class="bttn pos-right"  ng-click="addOrderModal()" value="新建">
    </div>
</div>
<table ui-table="orderParams">
	<thead>
		<tr>
			<th>
				ID
			</th>
			<th>
				角色名称
			</th>
			<th>
				描述
			</th>
			<th>
				操作
			</th>
		</tr>
	</thead>
	<tbody>
		<tr ng-repeat="item in orderParams.$rows">
			<td>{{item.id}}</td>
			<td>{{item.roleName}}</td>
			<td>{{item.description}}</td>
			<td>
				<a ng-click="openViewOrderModal(item.id)">编辑</a>
			</td>
		</tr>
	</tbody>
</table>
<modal title="权限管理" visible="orderModal">
	<form action="#" class="form-horizontal" role="form">
		<div class="form-body">
			<div class="scrollArea">
			<div class="row">
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">角色</label>

						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="ctrlScope.list.roleName"/>
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="form-group">
						<label class="control-label col-md-4">描述</label>
						<div class="col-md-8">
							<input type="text" class="form-control" ng-model="ctrlScope.list.description">
						</div>
					</div>
				</div>
			</div>
			<div style=" width: 100%;height: auto;">
				<div style="min-height: 182px;border-right:1px solid #eee;border-bottom:1px solid #eee;padding:16px 40px;" class="col-md-3" ng-repeat="resource in resourceData">
					<input type="checkbox" ng-model="checked[resource.id]" ng-click="checkAll(resource)"/>{{resource.resourceName}}
					<div style="margin-left: 20px;" ng-repeat="sub in subResourceData[$index]">
						<input type="checkbox" ng-model="checked[sub.id]"/>{{sub.resourceName}}
					</div>
				</div>
			</div>
			</div>
		</div>
		<div class="buttonArea col-md-12">
			<button type="button"  class="btn blue" ng-click="addRole()">提交</button>
		</div>
		<input type="hidden"  ng-model="ctrlScope.list.id">
	</form>
</modal>